import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:my_desk_flutter/model/bus_info_model.dart';

class BusListCard extends StatelessWidget {
  final BusInfoModel data;
  const BusListCard({super.key, required this.data});

  @override
  Widget build(BuildContext context) {
    return Card(
      child: Padding(
        padding: const EdgeInsets.all(8.0),
        child: Column(
          children: [
            Row(
              children: [
                Text(
                  data.name ?? '',
                  style: Theme.of(context).textTheme.titleMedium,
                ),
                SizedBox(width: 5.w),
                Flexible(
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Text(
                        '${data.fromStaName} ',
                        style: Theme.of(context).textTheme.labelSmall,
                      ),
                      Text(
                        '${data.toStaName}',
                        style: Theme.of(context).textTheme.labelSmall,
                      ),
                    ],
                  ),
                ),
              ],
            )
          ],
        ),
      ),
    );
  }
}
